Javadoc through Ant task with {@inheritDoc} from J2SE classes

Posted by miorel on Stack Overflow See other posts from Stack Overflow or by miorel
Published on 2010-03-30T15:55:37Z Indexed on 2010/03/31 0:43 UTC
Read the original article Hit count: 626

Filed under:
|
|
|

I generate documentation for a project using an Ant task. In several places, I wanted to inherit documentation from the standard classes, so I used {@inheritDoc} which allowed me to see the Javadoc in Eclipse, but it wouldn't show up in the HTML files. The problem was that I hadn't included the unzipped src.zip (J2SE source) in the sourcepath. Having fixed that, I now get several hundred warnings about the use of Sun proprietary API in files like lib/jdk-src/java/lang/Class.java.

Is there any way to suppress these warnings? It's hard to find relevant problems in this mess.

A possible solution I thought of was to run the Javadoc task once without including the J2SE source in the sourcepath, which will reveal any real issues. Then I can run Javadoc a second time with the J2SE source included, discarding the output altogether, which will produce documentation with properly-working {@inheritDoc}s. I'm not entirely sure about the best way to accomplish this in Ant, not to mention that running Javadoc twice would be a dirty fix.

Any suggestions?

© Stack Overflow or respective owner

Related posts about java

Related posts about javadoc